package com.tarena.lbs.business.config;

import com.tarena.lbs.common.encoder.JwtEncoder;
import com.tarena.lbs.common.principle.UserPrinciple;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 初始化一个jwt编码器 生成jwt和解析jwt
 */
@Configuration
public class JwtEncoderConfig {
    @Bean
    public JwtEncoder<UserPrinciple> jwtEncoder(){
        JwtEncoder<UserPrinciple> jwtEncoder = new JwtEncoder<>();
        return jwtEncoder;
    }
}
